using Refit;
using ZhaoXi.MSACommerce.CommonServiceClient;
using ZhaoXi.MSACommerce.CommonServiceClient.AspNetCore;
using ZhaoXi.MSACommerce.Consul.ServiceDiscovery;
using Zhaoxi.MSACommerce.PaymentService.UserCases.Service;

namespace Zhaoxi.MSACommerce.PaymentService.UserCases.Apis;

public class OrderClient(
    IServiceDiscovery serviceDiscovery,
    ILoadBalancer<OrderClient> loadBalancer,
    HttpClient httpClient)
    : ServiceClient(serviceDiscovery, loadBalancer, httpClient)
{
    public override string ServiceName { get; set; } = "Zhaoxi.MSACommerce.OrderService.HttpApi";
    public readonly IOrderService UserServiceApi = RestService.For<IOrderService>(httpClient);
}
